kexec: fix kexec_lock use in kexec_swap_images()
authorDavid Vrabel <david.vrabel@citrix.com>
Fri, 15 Nov 2013 09:59:41 +0000 (10:59 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 15 Nov 2013 09:59:41 +0000 (10:59 +0100)
commit029c84d2efbebc02a4e9a6ee9a3a94289ca36f72
treed891a08e3d270205ad548a8219d362d31cc21adc
parentfef491f2d974d4e33eec5b2a4d23fedae0f93fbd
kexec: fix kexec_lock use in kexec_swap_images()

CID 1128573

If a bad image type is supplied in a KEXECOP_unload hypercall, the
kexec_lock in kexec_swap_images() was left locked, causing a deadlock
on a subsequent image load or unload.

The kexec_lock is only required to serialize the swap operation
itself.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/common/kexec.c